<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SC2API: include/sc2api/sc2_unit.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="SC2-Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SC2API
   </div>
   <div id="projectbrief">An API for AI for StarCraft II</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_3d0dfd3160b31ffa512c49330ac8d646.html">sc2api</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">sc2_unit.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="sc2__unit_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;sc2_proto_interface.h&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sc2__gametypes_8h.html">sc2_gametypes.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sc2__common_8h.html">sc2_common.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sc2__typeenums_8h.html">sc2_typeenums.h</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;unordered_map&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacesc2.html">sc2</a> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">class </span>ObservationInterface;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="structsc2_1_1_unit_order.html">   20</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsc2_1_1_unit_order.html">UnitOrder</a> {</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structsc2_1_1_unit_order.html#a0582df20b81543fd031972a497920d74">   22</a></span>&#160;    <a class="code" href="classsc2_1_1_s_c2_type.html">AbilityID</a> <a class="code" href="structsc2_1_1_unit_order.html#a0582df20b81543fd031972a497920d74">ability_id</a>;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="structsc2_1_1_unit_order.html#aefffc0324bbb24f7dd7ab8def4e5afc2">   24</a></span>&#160;    Tag <a class="code" href="structsc2_1_1_unit_order.html#aefffc0324bbb24f7dd7ab8def4e5afc2">target_unit_tag</a>;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="structsc2_1_1_unit_order.html#ae4c062864ad55c38faaf1e1abcb74671">   26</a></span>&#160;    <a class="code" href="structsc2_1_1_point2_d.html">Point2D</a> <a class="code" href="structsc2_1_1_unit_order.html#ae4c062864ad55c38faaf1e1abcb74671">target_pos</a>;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="structsc2_1_1_unit_order.html#a820bb8f79dcaebcd02475b5ac2c522cc">   28</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structsc2_1_1_unit_order.html#a820bb8f79dcaebcd02475b5ac2c522cc">progress</a>;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <a class="code" href="structsc2_1_1_unit_order.html">UnitOrder</a>() :</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        ability_id(0),</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        target_unit_tag(NullTag),</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        progress(0.0f) {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    }</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;};</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="structsc2_1_1_passenger_unit.html">   38</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsc2_1_1_passenger_unit.html">PassengerUnit</a> {</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structsc2_1_1_passenger_unit.html#ab0fc9d12eb58790d3668876f48becb02">   40</a></span>&#160;    Tag <a class="code" href="structsc2_1_1_passenger_unit.html#ab0fc9d12eb58790d3668876f48becb02">tag</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structsc2_1_1_passenger_unit.html#a41fe19bef8810ba5c7e18d4ab3d05cd4">   42</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structsc2_1_1_passenger_unit.html#a41fe19bef8810ba5c7e18d4ab3d05cd4">health</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structsc2_1_1_passenger_unit.html#afdb24a4e42c3a981713aa311cc319ed4">   44</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structsc2_1_1_passenger_unit.html#afdb24a4e42c3a981713aa311cc319ed4">health_max</a>;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structsc2_1_1_passenger_unit.html#a8e79587e7907106cde23a76e2db4d1fd">   46</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structsc2_1_1_passenger_unit.html#a8e79587e7907106cde23a76e2db4d1fd">shield</a>;</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structsc2_1_1_passenger_unit.html#a1efad4d291286d5d8a7591fa4c12af4f">   48</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structsc2_1_1_passenger_unit.html#a1efad4d291286d5d8a7591fa4c12af4f">energy</a>;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structsc2_1_1_passenger_unit.html#a84f5da3c8a6c163f3b1eb5f0061e5d7e">   50</a></span>&#160;    <a class="code" href="classsc2_1_1_s_c2_type.html">UnitTypeID</a> <a class="code" href="structsc2_1_1_passenger_unit.html#a84f5da3c8a6c163f3b1eb5f0061e5d7e">unit_type</a>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <a class="code" href="structsc2_1_1_passenger_unit.html">PassengerUnit</a>() :</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        tag(NullTag),</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        health(0.0f),</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        health_max(0.0f),</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        shield(0.0f),</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        energy(0.0f),</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        unit_type(0) {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    }</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;};</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html">   63</a></span>&#160;<span class="keyword">class </span><a class="code" href="classsc2_1_1_unit.html">Unit</a> {</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">   66</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">DisplayType</a> {</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270abd326f19234975ca23bb3265223d969d">   68</a></span>&#160;        Visible = 1,</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270a0e970750301873d6ee4903e9bcb8d2c6">   71</a></span>&#160;        Snapshot = 2,</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270a688e1743ab48c61d2e77ac6212f77cd9">   73</a></span>&#160;        Hidden = 3,</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    };</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">   77</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">Alliance</a> {</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461af4dea1a00c973443e0d459bb522f7637">   79</a></span>&#160;        Self = 1,</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461a2215843e5737efd34b268be16757ed27">   81</a></span>&#160;        Ally = 2,</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461a50d778ca3f3c354474d27013b7eda3c1">   83</a></span>&#160;        Neutral = 3,</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461a005610fbf80eaa3cc4ea28c26a42eae6">   85</a></span>&#160;        Enemy = 4</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    };</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">   89</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">CloakState</a> {</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943ac0cfb31c1521ab9e7759bfa12bf05b23">   91</a></span>&#160;        Cloaked = 1,</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943a4d1351a1f8046904bf4b089813b610b0">   93</a></span>&#160;        CloakedDetected = 2,</div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943a992a9de6738dc46b3ba64a6da9030f0f">   95</a></span>&#160;        NotCloaked = 3,</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943a2cf1dac1fc0a53735ae998f1cd437446">   97</a></span>&#160;        Unknown = 4</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    };</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a37330a1811b5fe37894d13d8b8f000ac">  101</a></span>&#160;    <a class="code" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">DisplayType</a> <a class="code" href="classsc2_1_1_unit.html#a37330a1811b5fe37894d13d8b8f000ac">display_type</a>;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a639d0b3495e03ee28f5e91b16057d42b">  103</a></span>&#160;    <a class="code" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">Alliance</a> <a class="code" href="classsc2_1_1_unit.html#a639d0b3495e03ee28f5e91b16057d42b">alliance</a>;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a1312ee20e783753ee8ddf054878f7d9f">  106</a></span>&#160;    Tag <a class="code" href="classsc2_1_1_unit.html#a1312ee20e783753ee8ddf054878f7d9f">tag</a>;</div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a4d7e26d2a7a33bc685fc3696dfed026f">  108</a></span>&#160;    <a class="code" href="classsc2_1_1_s_c2_type.html">UnitTypeID</a> <a class="code" href="classsc2_1_1_unit.html#a4d7e26d2a7a33bc685fc3696dfed026f">unit_type</a>;</div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a29fec2e9dff50d8504e8a2b32f7a1af0">  110</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classsc2_1_1_unit.html#a29fec2e9dff50d8504e8a2b32f7a1af0">owner</a>;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#adbe75d15c90712cb1e55e8b8bcbc1319">  113</a></span>&#160;    <a class="code" href="structsc2_1_1_point3_d.html">Point3D</a> <a class="code" href="classsc2_1_1_unit.html#adbe75d15c90712cb1e55e8b8bcbc1319">pos</a>;</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a9f947f6dffd571c2ab89ddd53609a7f4">  115</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#a9f947f6dffd571c2ab89ddd53609a7f4">facing</a>;</div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a0c2d1fb9e6f150333d96cc8ce8f9e9bf">  117</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#a0c2d1fb9e6f150333d96cc8ce8f9e9bf">radius</a>;</div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#abb3c46774c4d5dab4d641a4abcf68aba">  119</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#abb3c46774c4d5dab4d641a4abcf68aba">build_progress</a>;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#ad06992e99ddf45f28be06550c61fabd4">  122</a></span>&#160;    <a class="code" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">CloakState</a> <a class="code" href="classsc2_1_1_unit.html#ad06992e99ddf45f28be06550c61fabd4">cloak</a>;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a212a848d56f8ce323c1a8b5ac7bd0221">  125</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#a212a848d56f8ce323c1a8b5ac7bd0221">detect_range</a>;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a22e99532761f81474b7e666e08bf8727">  127</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#a22e99532761f81474b7e666e08bf8727">radar_range</a>;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#afc532e894e9496c843ac00abce343f41">  130</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classsc2_1_1_unit.html#afc532e894e9496c843ac00abce343f41">is_selected</a>;</div><div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a2766e02109100817ffd5135591746293">  132</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classsc2_1_1_unit.html#a2766e02109100817ffd5135591746293">is_on_screen</a>;</div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#aa730ea2bf474d4422e6c6a1e267945d4">  134</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classsc2_1_1_unit.html#aa730ea2bf474d4422e6c6a1e267945d4">is_blip</a>;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="comment">// Not populated for snapshots</span></div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a7049529d7ec06419b85121a384949abf">  139</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#a7049529d7ec06419b85121a384949abf">health</a>;</div><div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a9903ceca120d82cacc49dee00150fe67">  141</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#a9903ceca120d82cacc49dee00150fe67">health_max</a>;</div><div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#ae5ee0c4d31a1266e31ac0a739bcc3d86">  143</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#ae5ee0c4d31a1266e31ac0a739bcc3d86">shield</a>;</div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#aa2b194b8a5499b7591356dc6365c0cdc">  145</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#aa2b194b8a5499b7591356dc6365c0cdc">energy</a>;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a689d7b7c9a68b3cd172f2333203423b9">  147</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classsc2_1_1_unit.html#a689d7b7c9a68b3cd172f2333203423b9">mineral_contents</a>;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a76fcaa010a8a61b14b2839f49ef0f257">  149</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classsc2_1_1_unit.html#a76fcaa010a8a61b14b2839f49ef0f257">vespene_contents</a>;</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a6480f0b177f99a656ab3a273df3f8c3c">  151</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classsc2_1_1_unit.html#a6480f0b177f99a656ab3a273df3f8c3c">is_flying</a>;</div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#af815cd5269616209d4a2bdf2e734decb">  153</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classsc2_1_1_unit.html#af815cd5269616209d4a2bdf2e734decb">is_burrowed</a>;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a09bcc532a373b225b4ddb16fa77e9c41">  155</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classsc2_1_1_unit.html#a09bcc532a373b225b4ddb16fa77e9c41">weapon_cooldown</a>;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="comment">// Not populated for enemies/snapshots</span></div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a45b97cf510454a385c372e512b40c51a">  160</a></span>&#160;    std::vector&lt;UnitOrder&gt; <a class="code" href="classsc2_1_1_unit.html#a45b97cf510454a385c372e512b40c51a">orders</a>;</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a01b13cf74f1851983a834fdbf3e22b8a">  162</a></span>&#160;    Tag <a class="code" href="classsc2_1_1_unit.html#a01b13cf74f1851983a834fdbf3e22b8a">add_on_tag</a>;</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a01e2249c0d1bd27d8b61f233fbd75b66">  164</a></span>&#160;    std::vector&lt;PassengerUnit&gt; <a class="code" href="classsc2_1_1_unit.html#a01e2249c0d1bd27d8b61f233fbd75b66">passengers</a>;</div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a59fb99084581bf4871a7de173931fc79">  166</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classsc2_1_1_unit.html#a59fb99084581bf4871a7de173931fc79">cargo_space_taken</a>;</div><div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#ab5dfd5b0c6f27a8a1f89b372260d9fb2">  168</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classsc2_1_1_unit.html#ab5dfd5b0c6f27a8a1f89b372260d9fb2">cargo_space_max</a>;</div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#aca42babe7fa2542782783a825fb99522">  170</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classsc2_1_1_unit.html#aca42babe7fa2542782783a825fb99522">assigned_harvesters</a>;</div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a59c9e7c9c14f50f11d33b58716f664fe">  172</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classsc2_1_1_unit.html#a59c9e7c9c14f50f11d33b58716f664fe">ideal_harvesters</a>;</div><div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a0d1cc770a037ed2458bf944a787dcca5">  174</a></span>&#160;    Tag <a class="code" href="classsc2_1_1_unit.html#a0d1cc770a037ed2458bf944a787dcca5">engaged_target_tag</a>;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classsc2_1_1_unit.html#a34f17705c61114ad78c192ed7b06a9af">  176</a></span>&#160;    std::vector&lt;BuffID&gt; <a class="code" href="classsc2_1_1_unit.html#a34f17705c61114ad78c192ed7b06a9af">buffs</a>;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <a class="code" href="classsc2_1_1_unit.html">Unit</a>();</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="keyword">operator</span> Tag()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tag; }</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;};</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="keyword">typedef</span> std::vector&lt;Unit&gt; Units;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">typedef</span> std::unordered_map&lt;Tag, size_t&gt; UnitIdxMap;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="structsc2_1_1_is_unit.html">  187</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsc2_1_1_is_unit.html">IsUnit</a> {</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <a class="code" href="structsc2_1_1_is_unit.html">IsUnit</a>(UNIT_TYPEID type) : type_(type) {};</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    UNIT_TYPEID type_;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> <a class="code" href="classsc2_1_1_unit.html">Unit</a>&amp; unit) { <span class="keywordflow">return</span> unit.<a class="code" href="classsc2_1_1_unit.html#a4d7e26d2a7a33bc685fc3696dfed026f">unit_type</a> == type_; };</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;};</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="structsc2_1_1_is_units.html">  194</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structsc2_1_1_is_units.html">IsUnits</a> {</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <a class="code" href="structsc2_1_1_is_units.html">IsUnits</a>(std::vector&lt;UNIT_TYPEID&gt; types) : types_(types) {};</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    std::vector&lt;UNIT_TYPEID&gt; types_;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> <a class="code" href="classsc2_1_1_unit.html">Unit</a>&amp; unit) {</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordtype">bool</span> included = <span class="keyword">false</span>;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; type : types_) {</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            included = included || (unit.<a class="code" href="classsc2_1_1_unit.html#a4d7e26d2a7a33bc685fc3696dfed026f">unit_type</a> == type);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        }</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="keywordflow">return</span> included;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    };</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;};</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div><div class="ttc" id="classsc2_1_1_unit_html_a2766e02109100817ffd5135591746293"><div class="ttname"><a href="classsc2_1_1_unit.html#a2766e02109100817ffd5135591746293">sc2::Unit::is_on_screen</a></div><div class="ttdeci">bool is_on_screen</div><div class="ttdoc">Visible and within the camera frustum. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:132</div></div>
<div class="ttc" id="structsc2_1_1_passenger_unit_html_ab0fc9d12eb58790d3668876f48becb02"><div class="ttname"><a href="structsc2_1_1_passenger_unit.html#ab0fc9d12eb58790d3668876f48becb02">sc2::PassengerUnit::tag</a></div><div class="ttdeci">Tag tag</div><div class="ttdoc">The tag of the unit in the transport. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:40</div></div>
<div class="ttc" id="structsc2_1_1_passenger_unit_html_a41fe19bef8810ba5c7e18d4ab3d05cd4"><div class="ttname"><a href="structsc2_1_1_passenger_unit.html#a41fe19bef8810ba5c7e18d4ab3d05cd4">sc2::PassengerUnit::health</a></div><div class="ttdeci">float health</div><div class="ttdoc">The health of the unit in the transport. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:42</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a03f99cfaa8ad4f9bba6cd0bc5586c943"><div class="ttname"><a href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">sc2::Unit::CloakState</a></div><div class="ttdeci">CloakState</div><div class="ttdoc">Unit cloak state. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:89</div></div>
<div class="ttc" id="sc2__common_8h_html"><div class="ttname"><a href="sc2__common_8h.html">sc2_common.h</a></div><div class="ttdoc">Common data types, including points, rectangles and colors. </div></div>
<div class="ttc" id="classsc2_1_1_unit_html"><div class="ttname"><a href="classsc2_1_1_unit.html">sc2::Unit</a></div><div class="ttdoc">A unit. Could be a structure, a worker or a military unit. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:63</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a5a40e672e7599d73ef8ef5758bbd7461"><div class="ttname"><a href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">sc2::Unit::Alliance</a></div><div class="ttdeci">Alliance</div><div class="ttdoc">Relationship to this player. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:77</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a45b97cf510454a385c372e512b40c51a"><div class="ttname"><a href="classsc2_1_1_unit.html#a45b97cf510454a385c372e512b40c51a">sc2::Unit::orders</a></div><div class="ttdeci">std::vector&lt; UnitOrder &gt; orders</div><div class="ttdoc">Orders on a unit. Only valid for this player&amp;#39;s units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:160</div></div>
<div class="ttc" id="structsc2_1_1_point3_d_html"><div class="ttname"><a href="structsc2_1_1_point3_d.html">sc2::Point3D</a></div><div class="ttdef"><b>Definition:</b> sc2_common.h:14</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a29fec2e9dff50d8504e8a2b32f7a1af0"><div class="ttname"><a href="classsc2_1_1_unit.html#a29fec2e9dff50d8504e8a2b32f7a1af0">sc2::Unit::owner</a></div><div class="ttdeci">int owner</div><div class="ttdoc">Which player owns a unit. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:110</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_aa730ea2bf474d4422e6c6a1e267945d4"><div class="ttname"><a href="classsc2_1_1_unit.html#aa730ea2bf474d4422e6c6a1e267945d4">sc2::Unit::is_blip</a></div><div class="ttdeci">bool is_blip</div><div class="ttdoc">Detected by sensor tower. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:134</div></div>
<div class="ttc" id="structsc2_1_1_point2_d_html"><div class="ttname"><a href="structsc2_1_1_point2_d.html">sc2::Point2D</a></div><div class="ttdef"><b>Definition:</b> sc2_common.h:49</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a0c2d1fb9e6f150333d96cc8ce8f9e9bf"><div class="ttname"><a href="classsc2_1_1_unit.html#a0c2d1fb9e6f150333d96cc8ce8f9e9bf">sc2::Unit::radius</a></div><div class="ttdeci">float radius</div><div class="ttdoc">Radius of the unit. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:117</div></div>
<div class="ttc" id="structsc2_1_1_is_unit_html"><div class="ttname"><a href="structsc2_1_1_is_unit.html">sc2::IsUnit</a></div><div class="ttdoc">Determines if the unit matches the unit type. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:187</div></div>
<div class="ttc" id="namespacesc2_html"><div class="ttname"><a href="namespacesc2.html">sc2</a></div><div class="ttdef"><b>Definition:</b> sc2_action.h:9</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a4d7e26d2a7a33bc685fc3696dfed026f"><div class="ttname"><a href="classsc2_1_1_unit.html#a4d7e26d2a7a33bc685fc3696dfed026f">sc2::Unit::unit_type</a></div><div class="ttdeci">UnitTypeID unit_type</div><div class="ttdoc">An identifier of the type of unit. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:108</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a01e2249c0d1bd27d8b61f233fbd75b66"><div class="ttname"><a href="classsc2_1_1_unit.html#a01e2249c0d1bd27d8b61f233fbd75b66">sc2::Unit::passengers</a></div><div class="ttdeci">std::vector&lt; PassengerUnit &gt; passengers</div><div class="ttdoc">Passengers in this transport. Only valid for this player&amp;#39;s units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:164</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_ad06992e99ddf45f28be06550c61fabd4"><div class="ttname"><a href="classsc2_1_1_unit.html#ad06992e99ddf45f28be06550c61fabd4">sc2::Unit::cloak</a></div><div class="ttdeci">CloakState cloak</div><div class="ttdoc">If the unit is cloaked. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:122</div></div>
<div class="ttc" id="sc2__typeenums_8h_html"><div class="ttname"><a href="sc2__typeenums_8h.html">sc2_typeenums.h</a></div><div class="ttdoc">A list of enums provided for your convenience. </div></div>
<div class="ttc" id="structsc2_1_1_passenger_unit_html_a8e79587e7907106cde23a76e2db4d1fd"><div class="ttname"><a href="structsc2_1_1_passenger_unit.html#a8e79587e7907106cde23a76e2db4d1fd">sc2::PassengerUnit::shield</a></div><div class="ttdeci">float shield</div><div class="ttdoc">The shield of the unit in the transport. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:46</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a7049529d7ec06419b85121a384949abf"><div class="ttname"><a href="classsc2_1_1_unit.html#a7049529d7ec06419b85121a384949abf">sc2::Unit::health</a></div><div class="ttdeci">float health</div><div class="ttdoc">Health of the unit. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:139</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a22e99532761f81474b7e666e08bf8727"><div class="ttname"><a href="classsc2_1_1_unit.html#a22e99532761f81474b7e666e08bf8727">sc2::Unit::radar_range</a></div><div class="ttdeci">float radar_range</div><div class="ttdoc">Range of radar for units that are radar units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:127</div></div>
<div class="ttc" id="structsc2_1_1_passenger_unit_html_a84f5da3c8a6c163f3b1eb5f0061e5d7e"><div class="ttname"><a href="structsc2_1_1_passenger_unit.html#a84f5da3c8a6c163f3b1eb5f0061e5d7e">sc2::PassengerUnit::unit_type</a></div><div class="ttdeci">UnitTypeID unit_type</div><div class="ttdoc">The type of unit in the transport. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:50</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a9f947f6dffd571c2ab89ddd53609a7f4"><div class="ttname"><a href="classsc2_1_1_unit.html#a9f947f6dffd571c2ab89ddd53609a7f4">sc2::Unit::facing</a></div><div class="ttdeci">float facing</div><div class="ttdoc">Direction the unit faces in radians (1 radian == 57.296 degrees) </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:115</div></div>
<div class="ttc" id="structsc2_1_1_passenger_unit_html"><div class="ttname"><a href="structsc2_1_1_passenger_unit.html">sc2::PassengerUnit</a></div><div class="ttdoc">A passenger on a transport. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:38</div></div>
<div class="ttc" id="structsc2_1_1_unit_order_html_a820bb8f79dcaebcd02475b5ac2c522cc"><div class="ttname"><a href="structsc2_1_1_unit_order.html#a820bb8f79dcaebcd02475b5ac2c522cc">sc2::UnitOrder::progress</a></div><div class="ttdeci">float progress</div><div class="ttdoc">Progress of the order. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:28</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a59c9e7c9c14f50f11d33b58716f664fe"><div class="ttname"><a href="classsc2_1_1_unit.html#a59c9e7c9c14f50f11d33b58716f664fe">sc2::Unit::ideal_harvesters</a></div><div class="ttdeci">int ideal_harvesters</div><div class="ttdoc">Number of harvesters that can be assigned to a town hall (e.g., Command Center). Only valid for this ...</div><div class="ttdef"><b>Definition:</b> sc2_unit.h:172</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a59fb99084581bf4871a7de173931fc79"><div class="ttname"><a href="classsc2_1_1_unit.html#a59fb99084581bf4871a7de173931fc79">sc2::Unit::cargo_space_taken</a></div><div class="ttdeci">int cargo_space_taken</div><div class="ttdoc">Number of cargo slots used in the transport. Only valid for this player&amp;#39;s units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:166</div></div>
<div class="ttc" id="structsc2_1_1_unit_order_html_aefffc0324bbb24f7dd7ab8def4e5afc2"><div class="ttname"><a href="structsc2_1_1_unit_order.html#aefffc0324bbb24f7dd7ab8def4e5afc2">sc2::UnitOrder::target_unit_tag</a></div><div class="ttdeci">Tag target_unit_tag</div><div class="ttdoc">Target unit of the order, if there is one. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:24</div></div>
<div class="ttc" id="structsc2_1_1_is_units_html"><div class="ttname"><a href="structsc2_1_1_is_units.html">sc2::IsUnits</a></div><div class="ttdoc">Determines if units matches the unit type. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:194</div></div>
<div class="ttc" id="structsc2_1_1_passenger_unit_html_a1efad4d291286d5d8a7591fa4c12af4f"><div class="ttname"><a href="structsc2_1_1_passenger_unit.html#a1efad4d291286d5d8a7591fa4c12af4f">sc2::PassengerUnit::energy</a></div><div class="ttdeci">float energy</div><div class="ttdoc">The energy of the unit in the transport. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:48</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_adbe75d15c90712cb1e55e8b8bcbc1319"><div class="ttname"><a href="classsc2_1_1_unit.html#adbe75d15c90712cb1e55e8b8bcbc1319">sc2::Unit::pos</a></div><div class="ttdeci">Point3D pos</div><div class="ttdoc">Position of the unit in the world. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:113</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_abb3c46774c4d5dab4d641a4abcf68aba"><div class="ttname"><a href="classsc2_1_1_unit.html#abb3c46774c4d5dab4d641a4abcf68aba">sc2::Unit::build_progress</a></div><div class="ttdeci">float build_progress</div><div class="ttdoc">Gives progress under construction. Range: [0.0, 1.0]. 1.0 == finished. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:119</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a01b13cf74f1851983a834fdbf3e22b8a"><div class="ttname"><a href="classsc2_1_1_unit.html#a01b13cf74f1851983a834fdbf3e22b8a">sc2::Unit::add_on_tag</a></div><div class="ttdeci">Tag add_on_tag</div><div class="ttdoc">Add-on like a tech lab or reactor. Only valid for this player&amp;#39;s units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:162</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a09bcc532a373b225b4ddb16fa77e9c41"><div class="ttname"><a href="classsc2_1_1_unit.html#a09bcc532a373b225b4ddb16fa77e9c41">sc2::Unit::weapon_cooldown</a></div><div class="ttdeci">float weapon_cooldown</div><div class="ttdoc">Time remaining for a weapon on cooldown. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:155</div></div>
<div class="ttc" id="sc2__gametypes_8h_html"><div class="ttname"><a href="sc2__gametypes_8h.html">sc2_gametypes.h</a></div><div class="ttdoc">Types used in setting up a game. </div></div>
<div class="ttc" id="classsc2_1_1_unit_html_aa2b194b8a5499b7591356dc6365c0cdc"><div class="ttname"><a href="classsc2_1_1_unit.html#aa2b194b8a5499b7591356dc6365c0cdc">sc2::Unit::energy</a></div><div class="ttdeci">float energy</div><div class="ttdoc">Energy of the unit. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:145</div></div>
<div class="ttc" id="structsc2_1_1_unit_order_html_a0582df20b81543fd031972a497920d74"><div class="ttname"><a href="structsc2_1_1_unit_order.html#a0582df20b81543fd031972a497920d74">sc2::UnitOrder::ability_id</a></div><div class="ttdeci">AbilityID ability_id</div><div class="ttdoc">Ability ID that triggered the order. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:22</div></div>
<div class="ttc" id="classsc2_1_1_s_c2_type_html"><div class="ttname"><a href="classsc2_1_1_s_c2_type.html">sc2::SC2Type&lt; ABILITY_ID &gt;</a></div></div>
<div class="ttc" id="structsc2_1_1_unit_order_html_ae4c062864ad55c38faaf1e1abcb74671"><div class="ttname"><a href="structsc2_1_1_unit_order.html#ae4c062864ad55c38faaf1e1abcb74671">sc2::UnitOrder::target_pos</a></div><div class="ttdeci">Point2D target_pos</div><div class="ttdoc">Target position of the order, if there is one. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:26</div></div>
<div class="ttc" id="structsc2_1_1_unit_order_html"><div class="ttname"><a href="structsc2_1_1_unit_order.html">sc2::UnitOrder</a></div><div class="ttdoc">An order that is active on a unit. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:20</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a639d0b3495e03ee28f5e91b16057d42b"><div class="ttname"><a href="classsc2_1_1_unit.html#a639d0b3495e03ee28f5e91b16057d42b">sc2::Unit::alliance</a></div><div class="ttdeci">Alliance alliance</div><div class="ttdoc">Relationship of the unit to this player. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:103</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a689d7b7c9a68b3cd172f2333203423b9"><div class="ttname"><a href="classsc2_1_1_unit.html#a689d7b7c9a68b3cd172f2333203423b9">sc2::Unit::mineral_contents</a></div><div class="ttdeci">int mineral_contents</div><div class="ttdoc">Amount of minerals if the unit is a mineral field. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:147</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a34f17705c61114ad78c192ed7b06a9af"><div class="ttname"><a href="classsc2_1_1_unit.html#a34f17705c61114ad78c192ed7b06a9af">sc2::Unit::buffs</a></div><div class="ttdeci">std::vector&lt; BuffID &gt; buffs</div><div class="ttdoc">Buffs on this unit. Only valid for this player&amp;#39;s units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:176</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_ae5ee0c4d31a1266e31ac0a739bcc3d86"><div class="ttname"><a href="classsc2_1_1_unit.html#ae5ee0c4d31a1266e31ac0a739bcc3d86">sc2::Unit::shield</a></div><div class="ttdeci">float shield</div><div class="ttdoc">Shield of the unit. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:143</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a76fcaa010a8a61b14b2839f49ef0f257"><div class="ttname"><a href="classsc2_1_1_unit.html#a76fcaa010a8a61b14b2839f49ef0f257">sc2::Unit::vespene_contents</a></div><div class="ttdeci">int vespene_contents</div><div class="ttdoc">Amount of vespene if the unit is a geyser. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:149</div></div>
<div class="ttc" id="structsc2_1_1_passenger_unit_html_afdb24a4e42c3a981713aa311cc319ed4"><div class="ttname"><a href="structsc2_1_1_passenger_unit.html#afdb24a4e42c3a981713aa311cc319ed4">sc2::PassengerUnit::health_max</a></div><div class="ttdeci">float health_max</div><div class="ttdoc">The max possible health of the unit in the transport. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:44</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a9903ceca120d82cacc49dee00150fe67"><div class="ttname"><a href="classsc2_1_1_unit.html#a9903ceca120d82cacc49dee00150fe67">sc2::Unit::health_max</a></div><div class="ttdeci">float health_max</div><div class="ttdoc">Max health for the unit. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:141</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_af815cd5269616209d4a2bdf2e734decb"><div class="ttname"><a href="classsc2_1_1_unit.html#af815cd5269616209d4a2bdf2e734decb">sc2::Unit::is_burrowed</a></div><div class="ttdeci">bool is_burrowed</div><div class="ttdoc">If the unit is burrowed. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:153</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a0d1cc770a037ed2458bf944a787dcca5"><div class="ttname"><a href="classsc2_1_1_unit.html#a0d1cc770a037ed2458bf944a787dcca5">sc2::Unit::engaged_target_tag</a></div><div class="ttdeci">Tag engaged_target_tag</div><div class="ttdoc">Target unit of a unit. Only valid for this player&amp;#39;s units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:174</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a6480f0b177f99a656ab3a273df3f8c3c"><div class="ttname"><a href="classsc2_1_1_unit.html#a6480f0b177f99a656ab3a273df3f8c3c">sc2::Unit::is_flying</a></div><div class="ttdeci">bool is_flying</div><div class="ttdoc">If the unit is flying. Not set for snapshots. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:151</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_aca42babe7fa2542782783a825fb99522"><div class="ttname"><a href="classsc2_1_1_unit.html#aca42babe7fa2542782783a825fb99522">sc2::Unit::assigned_harvesters</a></div><div class="ttdeci">int assigned_harvesters</div><div class="ttdoc">Number of harvesters associated with a town hall (e.g., Command Center). Only valid for this player&amp;#39;s...</div><div class="ttdef"><b>Definition:</b> sc2_unit.h:170</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a212a848d56f8ce323c1a8b5ac7bd0221"><div class="ttname"><a href="classsc2_1_1_unit.html#a212a848d56f8ce323c1a8b5ac7bd0221">sc2::Unit::detect_range</a></div><div class="ttdeci">float detect_range</div><div class="ttdoc">Range of detector for detector units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:125</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_ab5dfd5b0c6f27a8a1f89b372260d9fb2"><div class="ttname"><a href="classsc2_1_1_unit.html#ab5dfd5b0c6f27a8a1f89b372260d9fb2">sc2::Unit::cargo_space_max</a></div><div class="ttdeci">int cargo_space_max</div><div class="ttdoc">Number of cargo slots available for a transport. Only valid for this player&amp;#39;s units. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:168</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a1312ee20e783753ee8ddf054878f7d9f"><div class="ttname"><a href="classsc2_1_1_unit.html#a1312ee20e783753ee8ddf054878f7d9f">sc2::Unit::tag</a></div><div class="ttdeci">Tag tag</div><div class="ttdoc">A unique identifier for the instance of a unit. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:106</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_afc532e894e9496c843ac00abce343f41"><div class="ttname"><a href="classsc2_1_1_unit.html#afc532e894e9496c843ac00abce343f41">sc2::Unit::is_selected</a></div><div class="ttdeci">bool is_selected</div><div class="ttdoc">If the unit is in the current selection of the player. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:130</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_a37330a1811b5fe37894d13d8b8f000ac"><div class="ttname"><a href="classsc2_1_1_unit.html#a37330a1811b5fe37894d13d8b8f000ac">sc2::Unit::display_type</a></div><div class="ttdeci">DisplayType display_type</div><div class="ttdoc">If the unit is shown on screen or not. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:101</div></div>
<div class="ttc" id="classsc2_1_1_unit_html_af7815dad89107a05298c245b702ab270"><div class="ttname"><a href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">sc2::Unit::DisplayType</a></div><div class="ttdeci">DisplayType</div><div class="ttdoc">If the unit is shown on screen or not. </div><div class="ttdef"><b>Definition:</b> sc2_unit.h:66</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
